package com.sanyang.lawyer.controller.client;

import com.sanyang.lawyer.ResultApi.ResponseResult;
import com.sanyang.lawyer.entity.Client_state;
import com.sanyang.lawyer.service.client.ClientStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("clientState")
public class ClientStateController {
    
    @Autowired
    private ClientStateService stateService;


    //通过状态编号查询
    @RequestMapping("getbyid")
    public ResponseResult<Client_state> getbyid(int stateid){
        return ResponseResult.success(stateService.getbyid(stateid));
    }
    
    //查询所有
    @RequestMapping("listall")
    public ResponseResult<List<Client_state>> listall(){
        return ResponseResult.success(stateService.listall());
    }
    
}
